<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动画练习</title>
</head>
<body>
<script src="../js/jquery-1.4.2.js"></script>
<script>
    setInterval(function(){
        let img = $("<img src='mm1.jpg'>")
        let top = parseInt(Math.random()*500);
        img.css({"width":"20px","position":"absolute","top":top+"px"});
        $("body").append(img);
        //让图片右侧移动
        img.animate({"left":"500px"},1000).fadeOut(1000,function(){
            img.remove();
        })

    },10)


</script>

</body>
</html>